<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <h:outputStylesheet name="./css/default.css"/>
        <h:outputStylesheet name="./css/cssLayout.css"/>
        <title>Facelets Template</title>
    </h:head>

    <h:body>

        <div id="barraTitulo">
            <ui:insert name="barraTitulo"></ui:insert>
            <h:graphicImage library="img" name="logo.png" width="100" height="70"/>
        </div>
        
        <div id="barraMenu">
                       <h:form>
                           <p:megaMenu style="color: blue;">

                    <p:submenu label="Cadastro">
                        <p:column>
                            <p:submenu label="Novo cadastro">
                                <p:menuitem value="Cliente"  url="CadastrarCliente.xhtml"/>
                                <p:menuitem value="Categoria" url="CadastrarCategoria.xhtml"/>
                                <p:menuitem value="Ator" url="CadastrarAtor.xhtml"/>
                                <p:menuitem value="Filme" url="CadastrarFilme.xhtml"/>
                            </p:submenu>
                        </p:column>
                        
                        
                    </p:submenu>
                    
                                        <p:submenu label="Locação">
                        <p:column>
                            <p:submenu label="Nova Locação">
                                <p:menuitem value="Filmes"  url="CadastrarLocacao.xhtml"/>
                            </p:submenu>
                            <p:submenu label="Filmes alugados">
                                <p:menuitem value="Listas"  url="ListarLocacao.xhtml"/>
                            </p:submenu>
                        </p:column>
                        
                        
                    </p:submenu>

                    <p:submenu label="Logado">
                        <p:column>
                            <p:submenu label=" Usuario: #{LoginMB.usuario.nome}">
                                <p:menuitem value="Sair" action="#{LoginMB.logout}"/>
                            </p:submenu>
                        </p:column>
                        
                    </p:submenu>
                </p:megaMenu>
                
            </h:form>
            <ui:insert name="barraMenu"></ui:insert>
        </div>

        <div id="conteudo" class="center_content">
            
            <ui:insert name="conteudo"></ui:insert>
            <p:messages id="menssagens" showDetail="true" autoUpdate="true" closable="true" /> 
        </div>

        <div id="rodape">
            <ui:insert name="rodape"></ui:insert>
            &copy; Equipe Josué e Nicolau
        </div>

    </h:body>

</html>
